#include <QCoreApplication>
#include <iostream>
using namespace std;
int main()
{
  int A,B,s = 0;
  cin>>A;
  cin>>B;
  if (A<B)
  {
    for (;A <= B ;A++)
    {
      s =s+(A*A);
    }
    cout<<"\n"<<s;
  }
  return 0;
}
